package com.xiaotao.service;


import com.xiaotao.dto.GroupBuyDto;
import com.xiaotao.dto.OrderRequest;
//import com.xiaotao.entity.GroupBuy;
import com.xiaotao.entity.Orders;
import com.xiaotao.util.ResponseUtil;
import org.springframework.transaction.annotation.Transactional;

import java.math.BigDecimal;

public interface OrderService {
    ResponseUtil createOrderWithCoupon(OrderRequest req) throws Exception;
    ResponseUtil createGroupOrder(GroupBuyDto req) throws Exception;


    @Transactional(rollbackFor = Exception.class)// 声明事务
    void cancelOrder(String orderId);

    @Transactional
    void paySuccess(String orderId, String tradeNo, BigDecimal amount, byte payType);
    ResponseUtil verifyOrder(String orderId);
    ResponseUtil queryAll();
    ResponseUtil delete(String orderId);
    ResponseUtil update(Orders orders);
}
